//
//  InvoiceDetailTableViewCell.m
//  GLGW_Shoping
//
//  Created by whx on 2018/12/10.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "InvoiceDetailTableViewCell.h"

@implementation InvoiceDetailTableViewCell
{
    GLGWImageView *imgVie;
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        GLGWView *topV = [[GLGWView alloc] initWithInSuperView:self.contentView];
        topV.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
        [topV mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.contentView);
            make.left.equalTo(self.contentView).offset(kWidthProportion_In_iPhoneTriploid(15));
            make.right.equalTo(self.contentView).offset(-kWidthProportion_In_iPhoneTriploid(15));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(10)));
        }];
        
        GLGWLabel *lab = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:kColor_Rule_Black inSuperView:self.contentView];
        lab.text = @"发票模板";
        [lab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(topV.mas_bottom).offset(kHeightProportion_In_iPhoneTriploid(20));
            make.left.equalTo(topV.mas_left);
            make.bottom.equalTo(self.contentView).offset(-kHeightProportion_In_iPhoneTriploid(191));
        }];
        
        GLGWImageView *imgV = [[GLGWImageView alloc] initWithImageName:@"" inSuperView:self.contentView];
        [imgV mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(lab.mas_bottom).offset(kHeightProportion_In_iPhoneTriploid(15));
            make.left.equalTo(self.contentView.mas_left).offset(kHeightProportion_In_iPhoneTriploid(15));
            make.right.equalTo(self.contentView.mas_right).offset(-kHeightProportion_In_iPhoneTriploid(15));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(174)));
        }];
        imgV.contentMode = UIViewContentModeScaleToFill;
        imgV.backgroundColor = kRandomColor;
        imgVie = imgV;
    }
    return self;
}

- (void)setImgStr:(NSString *)imgStr
{
    _imgStr = imgStr;
    // 赋值请求网络图片
}
@end
